package cn.thornbird.orgsync.service;

import cn.thornbird.orgsync.entity.CertificateDetail;
import cn.thornbird.orgsync.entity.status.AppType;
import cn.thornbird.orgsync.exception.BadRequestException;
import cn.thornbird.orgsync.exception.ForbiddenException;
import cn.thornbird.orgsync.exception.NotFoundException;
import cn.thornbird.orgsync.model.UserData;
import cn.thornbird.orgsync.model.combined.CertificateObject;
import cn.thornbird.orgsync.vo.record.CertificateDetailRecord;

import java.util.List;

public interface CertificateService {

    CertificateObject find(UserData userData, String id) throws ForbiddenException, NotFoundException;

    CertificateDetail findDetail(UserData userData, String companyId, AppType appType)
            throws ForbiddenException, NotFoundException;

    List<CertificateObject> query(UserData userData);

    CertificateObject add(UserData userData, String companyId)
            throws BadRequestException, ForbiddenException, NotFoundException;

    CertificateObject save(UserData userData, String id, List<CertificateDetailRecord> details)
            throws BadRequestException, ForbiddenException, NotFoundException;

    CertificateObject delete(UserData userData, String id) throws ForbiddenException, NotFoundException;

}
